import request from '@/utils/request'
import { bb } from '@/utils/request';

//const bb = 'http://127.0.0.1:8080';
//const bb = 'http://182.92.190.174:8081';
//遍历游戏
export function getList(current,limit){
  return request({
    baseURL: bb,
    url: `/play/selectPlay/${current}/${limit}`,
    method: 'post',
  })
}

export function addPlay(playTime,playCost){
  return request({
    baseURL: bb,
    url: `/play/addPlay/${playTime}/${playCost}`,
    method: 'get',
  })
}

export function updatePlay(play){
  return request({
    baseURL: bb,
    url: `/play/updatePlay`,
    method: 'put',
    data:play
  })
}

export function deletePlay(playId){
  return request({
    baseURL: bb,
    url: `/play/deletePlay/${playId}`,
    method: 'delete',
  })
}

export function deletePlayAll(all){
  return request({
    baseURL: bb,
    url: `/play/deletePlayAll`,
    method: 'delete',
    data:all
  })
}

